package day2.p3;

import java.util.Random;

public class TestMedicine {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Medicine[] med = new Medicine[10];

		Random rand = new Random();

		for (int i = 0; i < med.length; i++) {
			int k = rand.nextInt(3);

			switch (k) {
			case 0:
				med[i] = new Ointment();
				break;

			case 1:
				med[i] = new Syrup();
				break;

			case 2:
				med[i] = new Tablet();
				break;
			}
			med[i].displayLabel();

		}
		Medicine m1 = new Medicine();
		m1.displayLabel();
	}

}
